<?php
    include "../inc/dbconn.php";
    $page = $_GET["page"]; //2
    $start = ($page-1) * 10;
    $sql="select * from qqg  order by Id desc limit {$start},24";

    $res = $mysqli->query($sql);

    if ($res->num_rows > 0){
        //查询到数据
        for($i = 0; $i < $res->num_rows;$i++){
            $tabData[] = $res->fetch_assoc();
        }
        $data["list"] = $tabData;
        $data["code"] = 1;
    }else{
        //没有数据
        $data["code"] = 0;
    }
    print_r(json_encode($data));
?>